package me.zhengjie.modules.inspection.service;

import me.zhengjie.modules.inspection.domain.TInspectionTask;
import me.zhengjie.modules.inspection.service.dto.TInspectionTaskDTO;
import me.zhengjie.modules.inspection.service.dto.TInspectionTaskQueryCriteria;

import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.domain.Pageable;

/**
* @author xuyukun
* @date 2019-07-21
*/
// @CacheConfig(cacheNames = "tInspectionTask")
public interface TInspectionTaskService {

    /**
    * queryAll 分页
    * @param criteria
    * @param pageable
    * @return
    */
    //@Cacheable(keyGenerator = "keyGenerator")
    Object queryAll(TInspectionTaskQueryCriteria criteria, Pageable pageable);
    
    public Object queryAllWithOrder(TInspectionTaskQueryCriteria criteria);

    /**
    * queryAll 不分页
    * @param criteria
    * @return
    */
   // @Cacheable(keyGenerator = "keyGenerator")
    public Object queryAll(TInspectionTaskQueryCriteria criteria);

    /**
     * findById
     * @param id
     * @return
     */
  //  @Cacheable(key = "#p0")
    TInspectionTaskDTO findById(Long id);

    /**
     * create
     * @param resources
     * @return
     */
   // @CacheEvict(allEntries = true)
    TInspectionTaskDTO create(TInspectionTask resources);

    /**
     * update
     * @param resources
     */
  //  @CacheEvict(allEntries = true)
    void update(TInspectionTask resources);

    /**
     * delete
     * @param id
     */
  //  @CacheEvict(allEntries = true)
    void delete(Long id);
}